package classes.Commands
{
	import components.brush.c_baseBrush;
	import components.brush.c_brushRelease;
	import components.dialogs.c_propertyDialog;
	import components.editor.c_baseElement;
	import components.editor.c_bitmapElement;
	
	public class c_enterBrushMode extends c_baseCommand {
		private var _brushRelease: c_brushRelease;
		private var _brush: c_baseBrush;
		private var _dialog: c_propertyDialog;
		public function c_enterBrushMode(a_element: c_bitmapElement, a_brushRelease: c_brushRelease, a_brush: c_baseBrush, a_dialog: c_propertyDialog) {
			super(a_element);
			_brushRelease = a_brushRelease;
			_brush 	= a_brush;
			_dialog	= a_dialog;
		}
		
		protected function get bitmapElement(): c_bitmapElement {
			return element as c_bitmapElement;
		}
		
		override public function Execute():void {
			_brushRelease.enterBrushMode(bitmapElement, _brush, _dialog);
		}
		
		override public function unExecute():void {
			_brushRelease.exitBrushMode();
		}
	}
}